#include "app_ads1110.h"
#include "bsp_ads1110.h"
#include "app_sub_can.h"
#include "main.h"

void app_ads1110_run(void)
{
    static uint16_t icnt = 0;

    icnt++;
    
    if (icnt >= SYS_HEART_MS(100))
    {
        icnt = 0;
        subCan.txMes1.mes.Hall1Vol = dv_ADS.fread(EM_ADS_CH1)+2500;
        subCan.txMes1.mes.Hall2Vol = dv_ADS.fread(EM_ADS_CH2)+2500;
        subCan.txMes1.mes.Hall3Vol = dv_ADS.fread(EM_ADS_CH3)+2500;
        subCan.txMes1.mes.Hall4Vol = dv_ADS.fread(EM_ADS_CH4)+2500;
    }
}